-- GENERATED SPELL FOR [Spectral Defender] --


function spell0_11289(pUnit, Event) --@Shield Block,Self--
pUnit:FullCastSpellOnTarget(12169,pUnit)
pUnit:RegisterEvent('Sorts_11289', 5329, 1)
end

function spell1_11289(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(11976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11289', 600, 1)
end

function Sorts_11289(pUnit, Event)
local choix_sorts_11289 = math.random(0, 1)
if choix_sorts_11289 == 0 then
pUnit:RegisterEvent('spell0_11289', 1, 1)
end
if choix_sorts_11289 == 1 then
pUnit:RegisterEvent('spell1_11289', 1, 1)
end
end

function mob11289_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11289', math.random(1500, 3000), 1)
end

function mob11289_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11289_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11289_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11289, 1, 'mob11289_Action')
RegisterUnitEvent(11289, 2, 'mob11289_Leave')
RegisterUnitEvent(11289, 3, 'mob11289_Kill')
RegisterUnitEvent(11289, 4, 'mob11289_Die')
